# $Id$
# Maintainer: Rémy Oudompheng <remy@archlinux.org>
# Contributor: Mateusz Krasowski <matkras@gmail.com>
# Contributor: Luigi ranghetti <ggranga@gmail.com>
# Generator  : CPANPLUS::Dist::Arch 1.25

pkgname='perl-autovivification'
_dist="autovivification"
pkgver=0.16
pkgrel=6
pkgdesc="Lexically disable autovivification."
arch=('i686' 'x86_64')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl>=5.8.3')
makedepends=()
url='http://search.cpan.org/dist/autovivification'
source=("http://www.cpan.org/authors/id/V/VP/VPIT/autovivification-$pkgver.tar.gz")
md5sums=('7e20817f6034910c1bc23351d81a0658')

build() {
    cd "${srcdir}/${_dist}-${pkgver}"
    unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
    export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
    perl Makefile.PL
    make
}

check() {
    cd "${srcdir}/${_dist}-${pkgver}"
    unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
    export PERL_MM_USE_DEFAULT=1
    make test
}

package() {
    cd "${srcdir}/${_dist}-${pkgver}"
    unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
    make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
}
